package com.cjc.sport.entity;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import java.util.Date;
import java.util.Objects;

/**
 * 轮播图对象
 */
public class Shuffling {
    /**
     * id
     */
    private String id;
    /**
     * 轮播图序号
     */
    private Integer shufflingNum;
    /**
     * 图片地址
     */
    @NotBlank
    @Length(min = 1, max = 200)
    private String imgUrl;
    /**
     * 标题
     */
    @NotBlank
    @Length(min = 1, max = 100)
    private String title;
    /**
     * 跳转地址
     */
    private String url;
    /**
     * 停留时间
     */
    private Integer keepTime;
    /**
     * 是否上线
     */
    private Boolean shufflingStatus;
    /**
     * 创建日期
     */
    private Date createDate;
    /**
     * 更新日期
     */
    private Date updateDate;
    /**
     * 更新日期String类型
     */
    private String updateDateString;

    /**
     * get
     *
     * @return get
     */
    public String getUpdateDateString() {
        return updateDateString;
    }

    /**
     * set
     *
     * @param updateDateString set
     */
    public void setUpdateDateString(String updateDateString) {
        this.updateDateString = updateDateString;
    }

    /**
     * get
     *
     * @return get
     */
    public String getId() {
        return id;
    }

    /**
     * set
     *
     * @param id set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * get
     *
     * @return get
     */
    public Integer getShufflingNum() {
        return shufflingNum;
    }

    /**
     * set
     *
     * @param shufflingNum set
     */
    public void setShufflingNum(Integer shufflingNum) {
        this.shufflingNum = shufflingNum;
    }

    /**
     * get
     *
     * @return get
     */
    public String getImgUrl() {
        return imgUrl;
    }

    /**
     * set
     *
     * @param imgUrl set
     */
    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    /**
     * get
     *
     * @return get
     */
    public String getTitle() {
        return title;
    }

    /**
     * set
     *
     * @param title set
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * get
     *
     * @return get
     */
    public String getUrl() {
        return url;
    }

    /**
     * set
     *
     * @param url set
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * get
     *
     * @return get
     */
    public Integer getKeepTime() {
        return keepTime;
    }

    /**
     * set
     *
     * @param keepTime set
     */
    public void setKeepTime(Integer keepTime) {
        this.keepTime = keepTime;
    }

    /**
     * get
     *
     * @return get
     */
    public Boolean getShufflingStatus() {
        return shufflingStatus;
    }

    /**
     * set
     *
     * @param shufflingStatus set
     */
    public void setShufflingStatus(Boolean shufflingStatus) {
        this.shufflingStatus = shufflingStatus;
    }

    /**
     * get
     *
     * @return get
     */
    public Date getCreateDate() {
        return createDate;
    }

    /**
     * set
     *
     * @param createDate set
     */
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    /**
     * get
     *
     * @return get
     */
    public Date getUpdateDate() {
        return updateDate;
    }

    /**
     * set
     *
     * @param updateDate set
     */
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Shuffling shuffling = (Shuffling) o;
        return Objects.equals(id, shuffling.id)
                && Objects.equals(shufflingNum, shuffling.shufflingNum)
                && Objects.equals(imgUrl, shuffling.imgUrl)
                && Objects.equals(title, shuffling.title)
                && Objects.equals(url, shuffling.url)
                && Objects.equals(shufflingStatus, shuffling.shufflingStatus);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, shufflingNum, imgUrl, title, url, shufflingStatus);
    }
}